#include "MainTools.h"

MainTools::MainTools(void)
{
}

MainTools::~MainTools(void)
{
}

bool MainTools::init()
{
	return true;
}

SEL_MenuHandler MainTools::onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName )
{
	return NULL;
}

SEL_CCControlHandler MainTools::onResolveCCBCCControlSelector( CCObject * pTarget, CCString * pSelectorName )
{
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onTaskBtnClick", MainTools::onTaskBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onEquipBtnClick", MainTools::onEquipBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onAttributeClick", MainTools::onAttributeClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onItemBtnClick", MainTools::onItemBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onChallengeBtnClick", MainTools::onChallengeBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onGrabBtnClick", MainTools::onGrabBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onMessageBtnClick", MainTools::onMessageBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onMysteryShopBtnClick", MainTools::onMysteryShopBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onShopBtnClick", MainTools::onShopBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onSystemBtnClick", MainTools::onSystemBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onMeltBtnClick", MainTools::onMeltBtnClick);
	return NULL;
}

bool MainTools::onAssignCCBMemberVariable( CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode )
{
	return false;
}

void MainTools::onNodeLoaded( CCNode * pNode, CCNodeLoader * pNodeLoader )
{

}

void MainTools::onEnter()
{
	CCNode::onEnter();
}

void MainTools::onExit()
{
	CCNode::onExit();
}

void MainTools::refresh()
{

}

void MainTools::onTaskBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{
    Framework::getSingletonPtr()->changeState("DungeonsScene");
}

void MainTools::onEquipBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{
    Framework::getSingletonPtr()->changeState("PacketScene");
}

void MainTools::onAttributeClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{
	Framework::getSingletonPtr()->changeState("PlayerDetailScene");
}

void MainTools::onItemBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{
    Framework::getSingletonPtr()->changeState("PacketScene");
}

void MainTools::onChallengeBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{
    Framework::getSingletonPtr()->changeState("ChallengeScene");
}

void MainTools::onGrabBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{
	Framework::getSingletonPtr()->changeState("SnatchScene");
}

void MainTools::onMessageBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{

}

void MainTools::onMysteryShopBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{

}

void MainTools::onShopBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{

}

void MainTools::onSystemBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{

}

void MainTools::onMeltBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{

}
